package org.kairosdb.core.processingstage;

import com.google.common.collect.ImmutableList;
import org.kairosdb.core.processingstage.metadata.FeatureProcessingMetadata;

public interface FeatureProcessor
{

    /**
     * Returns an {@link ImmutableList} of {@link FeatureProcessingFactory}
     * instances for the feature.
     *
     * @return the {@link ImmutableList} describing the feature
     */
    ImmutableList<FeatureProcessingFactory<?>> getFeatureProcessingFactories();

    /**
     * Returns an {@link FeatureProcessingFactory} instance which can generate
     * features.
     * The feature processor type must be specified in parameters.
     *
     * @param feature  feature type generated by the {@link FeatureProcessingFactory}
     * @return instance of {@link FeatureProcessingFactory}
     */
    FeatureProcessingFactory<?> getFeatureProcessingFactory(Class<?> feature);

    /**
     * Returns an {@link FeatureProcessingFactory} instance whose can generate feature processors.
     * The {@link FeatureProcessingFactory} name must be specified in parameters.
     *
     * @param feature  name of the {@link FeatureProcessingFactory}
     * @return instance of {@link FeatureProcessingFactory}
     */
    FeatureProcessingFactory<?> getFeatureProcessingFactory(String feature);

    /**
     * Returns an {@link ImmutableList} of {@link FeatureProcessingMetadata}
     * describing the feature.
     *
     * @return the {@link ImmutableList} describing the feature
     */
    ImmutableList<FeatureProcessingMetadata> getFeatureProcessingMetadata();
}
